<%@ page import="com.apexedu.portal.constant.Constants" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    request.setAttribute("basePath", request.getContextPath());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title><%=Constants.ProjectInfo.PROJECT_NAME%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="${basePath}/resources/css/mh.shd.css" rel="stylesheet">
    <link href="${basePath}/resources/ui/bootstrap/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="${basePath}/resources/ui/js/jquery-1.10.2.min.js"></script>
    <script src="${basePath}/resources/js/mh.shd.index.js" type="text/javascript"></script>
    <script src="${basePath}/component/layer/layer.js" type="text/javascript"></script>

    <link rel='stylesheet' href='${basePath}/component/fullcalendar-2.4.0/lib/cupertino/jquery-ui.min.css' />
    <link href='${basePath}/component/fullcalendar-2.4.0/fullcalendar.css' rel='stylesheet' />
    <link href='${basePath}/component/fullcalendar-2.4.0/fullcalendar.print.css' rel='stylesheet' media='print' />
    <script src='${basePath}/component/fullcalendar-2.4.0/lib/moment.min.js'></script>
   <%-- <script src='${basePath}/component/fullcalendar-2.4.0/lib/jquery.min.js'></script>--%>
    <script src='${basePath}/component/fullcalendar-2.4.0/fullcalendar.min.js'></script>
    <script src='${basePath}/component/fullcalendar-2.4.0/lang/zh-cn.js'></script>

    <style>
        #contentSub{
            text-align:left;
            background: #fff none repeat scroll 0 0;
            padding: 10px;
        }
    </style>

    <script>

        //获取日期
        function getDate() {
            var now = new Date();
            var year = now.getFullYear();       //年
            var month = now.getMonth() + 1;     //月
            var day = now.getDate();            //日
            var clock = year + "-";
            if (month < 10)
             clock += "0";
            clock += month + "-";
            if (day < 10)
             clock += "0";
            clock += day;
            return (clock);
        }

        $(document).ready(function() {
            var currentLangCode = 'zh-cn';
            function renderCalendar() {
                $('#calendar').fullCalendar({
                    header: {
                        left: 'prev,next today',
                        center: 'title',
                        right: 'month,agendaWeek,agendaDay'
                    },
                    defaultDate: '${defaultDate}',
                    lang: currentLangCode,
                    buttonIcons: false, // show the prev/next text
                    weekNumbers: true,
                    editable: false,
                    eventLimit: true, // allow "more" link when too many events
                    events: ${events}
                });
            }
            renderCalendar();
        });

    </script>
    <style>
        #calendar {
            max-width: 1100px;
            padding: 0 10px;
        }
        #tj {
            box-sizing: border-box;
            cursor: pointer;
            font-size: 1em;
            height: 2.1em;
            margin: 0;
            padding: 0 0.6em;
            white-space: nowrap;
        }
    </style>

</head>
<body>
<div id="main">
    <input type="hidden" id="choosed" value="2"/>
    <jsp:include page="../left.jsp"/>
    <div id="right">
        <jsp:include page="../head.jsp"/>
        <div id="contentSub">
            <h4 style="padding-left: 10px;">日程安排</h4>
            <div id='calendar'></div>
            <div style="position: absolute;left:184px;top:50px;"><button id="tj" type="button" onclick="window.open('http://oa.sada.sh.edu.cn/UIProcessor?Table=tSchedule&ObjDescribe=IReaQccqrycVlBmkJT9MrA..')">添加</button></div>
        </div>
        <jsp:include page="../foot.jsp"/>
    </div>
</div>

</body>
</html>
